import request from '@/utils/request'
import requests from '@/utils/subOrderForm'

// **************我的工单**********************
export function appraiserAdminList (data) { //工单列表
  return request({
    url: '/appraiser/workorder/list',
    method: 'get',
    params : data
  })
}

export function getWorkOrderDetail (data) { //工单详情
	return request({
	  url: '/appraiser/workorder/'+data,
	  method: 'get',

	})
  }

export function getscpXQ (data) { //奢侈品工单详情
    return request({
        url: '/appraiser/workorder/luxury/'+data,
        method: 'get',

    })
}


export function addWorkOrder (data,method) { //新增工单
  return request({
    url: '/appraiser/workorder',
    method: method,
    data
  })
}

export function delWorkOrder (id) { //删除工单
  return request({
    url: '/appraiser/workorder/'+id,
    method:'DELETE',
  })
}
export function getAppraiserLists (data) { //获取评估师列表
  return request({
    url: '/upms/appraiser/list',
    method:'get',
    params:data
  })
}
// **************评估师**********************

export function addAppraiserList (data) { //获取评估师列表
  return request({
    url: '/upms/appraiser/list',
    method:'get',
    params:data
  })
}

export function delAppraiser (data) { //删除评估师
  return request({
    url: '/upms/appraiser/del',
    method:'DELETE',
    data
  })
}
export function addAppraiser (data,method) { //新增评估师
  return request({
    url: '/upms/appraiser/create',
    method:method,
    data
  })
}

export function editAppraiser (data) { //编辑评估师
  return request({
    url: '/upms/appraiser/edit',
    method:"POST",
    data
  })
}

export function getStoreList (data) { //新增评估师门店列表
  return request({
    url: '/store/store/searchall',
    method:"POST",
    data
  })
}

export function getProvinceList () { //get省份
  return request({
    url: '/upms/appraiser/range/province',
    method:'get',
  })
}

export function getCityList (data) { //get城市
  return request({
    url: '/upms/appraiser/range/citys',
    method:'get',
    params : data

  })
}

export function getRegionList (data) { //get地区
  return request({
    url: '/upms/appraiser/range/area',
    method:'get',
    params : data
  })
}

export function getAppRegionList (id) { //评估师负责区域详情
  return request({
    url: '/upms/appraiser/detail',
    method:'get',
    params : id
  })
}

export function delAppRegionList (id) { //删除评估师负责区域详情
  return request({
    url: '/upms/appraiser/dist',
    method:'DELETE',
    params : id
  })
}

// **************评估师负责区域**********************

export function addTakeArea (data) { //添加评估师区域
  return request({
    url: '/upms/appraiser/dist',
    method:'post',
    data
  })
}
// **************发货单**********************

export function getAppDispatchList () { //货单列表
  return request({
    url: '/appraiser/workdeliver',
    method:'get',
  })
}

// **************奢侈品订单**********************

export function getluxuryList (data) { //获取奢饰品订单列表
    return request({
      url: '/oms/order/admin/picture',
      method:'get',
      params:data
    })
  }

// **************快点寄卖订单**********************

export function getexpressList () { //获取快点寄卖订单列表
    return request({
      url: '/oms/order/admin/picture',
      method:'get',
    })
  }

export function getexpressDetails (data) { //获取快点寄卖订单详情
    return request({
        url: '/oms/order/admin/details/'+data,
        method:'get',
    })
}

export function getexpressDetailNo (data) { //获取快点寄卖订单详情 传入订单号
    return request({
        url: '/oms/order/admin/orderNo/details/'+data,
        method:'get',
    })
}

export function takeOrder (data,method) { // 快递寄卖接单
    return request({
        url: '/appraiser/workorder',
        method:method,
        params:data
    })
}

export function kdjmOrderList (data) { // 快递寄卖工单 列表
    return request({
        url: '/appraiser/workorder',
        method:'get',
        params:data
    })
}

export function subOrderForm (data,method) { // 快递寄卖接单
    return requests({
        url: '/appraiser/workorder',
        method:method,
        data
    })
}



export function LogisticsCargoInfo (logisticsNo) { //通过物流单号查询物流货物信息
    return requests({
        url: '/wms-center/wms-receive',
        method: 'get',
        params : {logisticsNo}
    })
}

export function wlInfo (number) { // 快递寄卖接单
    return requests({
        url: '/logistics/query',
        method:"get",
        params:number
    })
}
